package com.ys.erp.stage_marketing_service.bean.condition;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ys.erp.entity.data.bean.ActivityTurnable;
import com.ys.erp.entity.data.bean.PayRecord;
import com.ys.erp.framework.condition.BasePageCondition;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * @author 南山
 * @date 2025/09/19 17:22
 */
@Data
@Schema(description = "转盘活动相关请求条件")
public class ActivityTurntableCondition {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @Schema(description = "分页查询转盘活动请求条件")
    public static class PageActivityTurntableCon extends BasePageCondition {
    }

    @Data
    @Schema(description = "添加或更新转盘活动请求条件")
    public static class AddOrUpdateActivityTurntableCon {
        @Schema(description = "活动id")
        private Long id;

        @Schema(description = "活动名称")
        private String activityName;

        @Schema(description = "开始时间")
        private String startTime;

        @Schema(description = "结束时间")
        private String endTime;

        @Schema(description = "背景图片")
        private String background;

        @Schema(description = "抽奖次数耗尽信息")
        private String exhaustMessage;

        @Schema(description = "分享图标")
        private String shareIcon;

        @Schema(description = "我的奖品名称图标")
        private String myPrizeNameIcon;

        @Schema(description = "分享海报")
        private String sharePoster;

        @Schema(description = "参与规则")
        private JoinRule joinRule;

        @Schema(description = "兑换规则")
        private RedeemRule redeemRule;

        @Schema(description = "奖品列表")
        private List<ActivityTurntablePrized> activityTurntablePrizedList;

    }


    @EqualsAndHashCode(callSuper = true)
    @Data
    @Schema(description = "获取转盘活动参与者分页列表请求条件")
    public static class GetActivityTurntableJoinUserPage extends BasePageCondition {
        @Schema(description = "活动id")
        private Long activityId;
        @Schema(description = "接宠状态")
        private String petTakeStatus;
    }


    @EqualsAndHashCode(callSuper = true)
    @Data
    @Schema(description = "获取转盘活动中奖者统计信息请求条件")
    public static class GetActivityTurntableWinnerPage extends BasePageCondition {
        @Schema(description = "活动id")
        private Long activityId;

        @Schema(description = "兑换状态")
        private String redeemStatus;

        @Schema(description = "奖品类型")
        private String prizedType;

        @Schema(description = "是否领猫")
        private String isPetTake;
    }


    @EqualsAndHashCode(callSuper = true)
    @Data
    @Schema(description = "获取转盘活动实物兑换分页列表请求条件")
    public static class GetActivityTurntablePhysicalRedeemPage extends BasePageCondition {

        @Schema(description = "活动id")
        private Long activityId;

        @Schema(description = "用户id")
        private Long userId;

        @Schema(description = "发货状态")
        private String sendStatus;
    }

    @Data
    public static class JoinRule {
        @Schema(description = "抽奖规则 ,每天n次：ALL_USER_DAY_NUM," + "活动期间总共可以抽取n次：ALL_USER_TOTAL_NUM," + "领猫和未领猫抽取n次：ADOPT_AND_NOT_ADOPT_USER_NUM")
        private String type;

        @Schema(description = "抽奖规则 siphonList")
        private List<Siphon> siphonList;
    }

    @Data
    public static class Siphon {

        @Schema(description = "全部用户：ALL 领猫用户：ADOPT 未领猫用户：NOT_ADOPT")
        private String type;

        @Schema(description = "抽奖次数")
        private Integer num;
    }

    @Data
    public static class RedeemRule {

        @Schema(description = "兑换规则 不限时兑换：NO_OVER_TIME," + "活动结束前兑换：ACTIVITY_END_OVER_TIME," + "中奖多少小时前可兑换：WINNER_HOUR_OVER_TIME")
        private String type;

        @Schema(description = "小时")
        private String hour;
    }


    @Data
    public static class ActivityTurntablePrized {

        @Schema(description = "奖品类型")
        private String type;

        @Schema(description = "奖品数量")
        private String quantityPerPrize;

        @Schema(description = "奖品总数")
        private String total;

        @Schema(description = "中奖概率")
        private String winnerRate;

        @Schema(description = "奖品名称")
        private String prizedName;

        @Schema(description = "奖品图标")
        private String prizedIcon;

        @Schema(description = "奖品id")
        private Long prizedId;
    }

    @Data
    @Schema(description = "转盘活动实物发货请求条件")

    public static class PhysicalSendCon {

        @Schema(description = "实物兑换id")
        private Long redeemRecordId;

        @Schema(description = "发货单号列表")
        private List<String> waybillNoList;
    }
}
